//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { WechatopenTemplate, WechatopenTemplateResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooWechatopenTemplateList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<WechatopenTemplateResponse>(`/uctoo/wechatopen_template/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooWechatopenTemplate = async (id: string) => {
  return requestClient.get<WechatopenTemplate>(`/uctoo/wechatopen_template/${id}`);
};

export const adductooWechatopenTemplate = async (data: Partial<WechatopenTemplate>) => {
  return requestClient.post<WechatopenTemplate>('/uctoo/wechatopen_template/add', data);
};

export const edituctooWechatopenTemplate = async (data: Partial<WechatopenTemplate>) => {
  return requestClient.post<WechatopenTemplate>('/uctoo/wechatopen_template/edit', data);
};

export const deleteuctooWechatopenTemplate = async (id: string) => {
  return requestClient.post<any>('/uctoo/wechatopen_template/del', { id });
};
